package com.zuoye;
/*
  五个人比身高  分别为 150 160 170 180 190
  分别求出最高值 和最低值和五个人的平均身高
 */
public class TestZuoye03 {
    public static void main(String[] args) {
        int h1 = 150;
        int h2 = 160;
        int h3 = 170;
        int h4 = 180;
        int h5 = 190;
        // 求最高值
        int max1 = h1 > h2?h1:h2;
        int max2 = max1 > h3?max1:h3;
        int max3 = max2 > h4?max2:h4;
        int max  = max3 > h5?max3:h5;
        System.out.println(max);
        //求最低值
        int min1 = h1 > h2?h2:h1;
        int min2 = min1 > h3?h3:min1;
        int min3 = min2 > h4?h4:min2;
        int min  = min3 > h5?h5:min3;
        System.out.println(min);
        // 求平均值
        int mean = (h1+h2+h3+h4+h5)/5;
        System.out.println(mean);
    }

}
